var t = getApp(), e = t.requirejs('core'), a = t.requirejs("foxui");
Page({
    data: {
        id: 0,
        item: [],
        saler: [],
        member: [],
        coupon: [],
        order_fields: [],
        order_data: []
    },
    onLoad(s) {
        this.setData(s);
        this.getBasic();
    },
    getBasic() {
        e.get("yam/manage/getdetail", {id:this.data.id}, res => {
            console.log(res);
            if(res.error==0){
                this.setData({
                    item: res.item,
                    saler: res.saler,
                    member: res.member,
                    coupon: res.coupon,
                    order_fields: res.order_fields,
                    order_data: res.order_data
                })
            }else{
                // wx.navigateBack();
                a.toast(this, res.message);
            }
        })
    }
})